package com.mdlib.helper.ui.adapter;

import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ljlib.help.R;
import com.mdlib.helper.model.entity.AgecyType;

import java.util.List;

/**
 * 作者：HQY on 16/11/22 15:57
 * 邮箱：hqy_xz@126.com
 */

public class AgecyTypeAdapter extends BaseQuickAdapter<AgecyType> {


    public AgecyTypeAdapter(List<AgecyType> data) {
        super(R.layout.item_agecy_type, data);
    }


    @Override
    protected void convert(BaseViewHolder baseViewHolder, AgecyType agecyType) {

        baseViewHolder.setText(R.id.tv_agecy_name, agecyType.getName());

        if (agecyType.isHied()) {
            baseViewHolder.getView(R.id.iv_agecy_default).setVisibility(View.VISIBLE);
        } else {
            baseViewHolder.getView(R.id.iv_agecy_default).setVisibility(View.GONE);
        }
    }
}
